<!DOCTYPE html>
<html lang="en">
<head>
<title>WebUI4Delphi: uWebUIMiscFunctions</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<h1 class="unit">Unit uWebUIMiscFunctions</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section">Uses</div><div class="one_section">Classes, Interfaces, Objects and Records</div><div class="one_section"><a class="section" href="#PasDoc-FuncsProcs">Functions and Procedures</a></div><div class="one_section">Types</div><div class="one_section"><a class="section" href="#PasDoc-Constants">Constants</a></div><div class="one_section">Variables</div></div>
<span id="PasDoc-Description"></span><h2 class="description">Description</h2>
<p class="nodescription">This item has no description.</p><span id="PasDoc-Uses"></span><h2 class="overview">Overview</h2>
<span id="PasDoc-FuncsProcs"></span><h3 class="summary">Functions and Procedures</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code>procedure <strong><a href="uWebUIMiscFunctions.html#OutputDebugMessage-string-">OutputDebugMessage</a></strong>(const aMessage : string);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#CustomExceptionHandler-string-exception-">CustomExceptionHandler</a></strong>(const aFunctionName : string; const aException : exception) : boolean;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#CustomPathIsRelative-string-">CustomPathIsRelative</a></strong>(const aPath : string) : boolean;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#CustomPathCanonicalize-string-string-">CustomPathCanonicalize</a></strong>(const aOriginalPath : string; var aCanonicalPath : string) : boolean;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#CustomAbsolutePath-string-boolean-">CustomAbsolutePath</a></strong>(const aPath : string; aMustExist : boolean = False) : string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#CustomPathIsURL-string-">CustomPathIsURL</a></strong>(const aPath : string) : boolean;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#CustomPathIsUNC-string-">CustomPathIsUNC</a></strong>(const aPath : string) : boolean;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#GetModulePath">GetModulePath</a></strong>: string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#ExecuteFile-string-string-string-integer-">ExecuteFile</a></strong>(const filename, Params, DefaultDir: string; ShowCmd: integer): THandle;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#LibraryExists-string-">LibraryExists</a></strong>(const aPath : string) : boolean;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#StringToPWebUIChar-string-integer-">StringToPWebUIChar</a></strong>(const aSrcString: string; var aRsltLength: integer): <a href="uWebUITypes.html#PWebUIChar">PWebUIChar</a>;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#PathIsRelativeAnsi-LPCSTR-">PathIsRelativeAnsi</a></strong>(pszPath: LPCSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsRelativeA';</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#PathIsRelativeUnicode-LPCWSTR-">PathIsRelativeUnicode</a></strong>(pszPath: LPCWSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsRelativeW';</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#PathCanonicalizeAnsi-LPSTR-LPCSTR-">PathCanonicalizeAnsi</a></strong>(pszBuf: LPSTR; pszPath: LPCSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathCanonicalizeA';</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#PathCanonicalizeUnicode-LPWSTR-LPCWSTR-">PathCanonicalizeUnicode</a></strong>(pszBuf: LPWSTR; pszPath: LPCWSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathCanonicalizeW';</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#PathIsUNCAnsi-LPCSTR-">PathIsUNCAnsi</a></strong>(pszPath: LPCSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsUNCA';</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#PathIsUNCUnicode-LPCWSTR-">PathIsUNCUnicode</a></strong>(pszPath: LPCWSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsUNCW';</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#PathIsURLAnsi-LPCSTR-">PathIsURLAnsi</a></strong>(pszPath: LPCSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsURLA';</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <strong><a href="uWebUIMiscFunctions.html#PathIsURLUnicode-LPCWSTR-">PathIsURLUnicode</a></strong>(pszPath: LPCWSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsURLW';</code></td>
</tr>
</table>
<span id="PasDoc-Constants"></span><h3 class="summary">Constants</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><strong><a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a></strong>  = 'shlwapi.dll';</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Functions and Procedures</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="OutputDebugMessage-string-"></span><code>procedure <strong>OutputDebugMessage</strong>(const aMessage : string);</code></td>
</tr>
<tr><td colspan="1">
<p>
 Sends a string to the debugger for display. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-outputdebugstringw">https://learn.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-outputdebugstringw</a>&quot;&gt;See the OutputDebugStringW article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="CustomExceptionHandler-string-exception-"></span><code>function <strong>CustomExceptionHandler</strong>(const aFunctionName : string; const aException : exception) : boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Sends the function and exception names to the debugger for display and raises the exception. </p>
<p>
 

<p>

<p></p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>aFunctionName</dt>
<dd>Function that registered the exception.</dd>
<dt>aException</dt>
<dd>Exception information.</dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return">Returns true if the exception was raised.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="CustomPathIsRelative-string-"></span><code>function <strong>CustomPathIsRelative</strong>(const aPath : string) : boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Returns true if aPath is a relative path. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathisrelativew">https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathisrelativew</a>&quot;&gt;See the PathIsRelativeW article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="CustomPathCanonicalize-string-string-"></span><code>function <strong>CustomPathCanonicalize</strong>(const aOriginalPath : string; var aCanonicalPath : string) : boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Simplifies a path by removing navigation elements such as &quot;.&quot; and &quot;..&quot; to produce a direct, well-formed path. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathcanonicalizew">https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathcanonicalizew</a>&quot;&gt;See the PathCanonicalizeW article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="CustomAbsolutePath-string-boolean-"></span><code>function <strong>CustomAbsolutePath</strong>(const aPath : string; aMustExist : boolean = False) : string;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Returns the absolute path version of aPath. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="CustomPathIsURL-string-"></span><code>function <strong>CustomPathIsURL</strong>(const aPath : string) : boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Tests aPath to determine if it conforms to a valid URL format. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathisurlw">https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathisurlw</a>&quot;&gt;See the PathIsURLW article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="CustomPathIsUNC-string-"></span><code>function <strong>CustomPathIsUNC</strong>(const aPath : string) : boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Determines if aPath is a valid Universal Naming Convention (UNC) path, as opposed to a path based on a drive letter. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathisuncw">https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathisuncw</a>&quot;&gt;See the PathIsUNCW article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="GetModulePath"></span><code>function <strong>GetModulePath</strong>: string;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Retrieves the fully qualified path for the current module. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamew">https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamew</a>&quot;&gt;See the GetModuleFileNameW article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="ExecuteFile-string-string-string-integer-"></span><code>function <strong>ExecuteFile</strong>(const filename, Params, DefaultDir: string; ShowCmd: integer): THandle;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Performs an operation on a specified file. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew">https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew</a>&quot;&gt;See the ShellExecuteW article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="LibraryExists-string-"></span><code>function <strong>LibraryExists</strong>(const aPath : string) : boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Checks that the WebUI library exists. </p>
<p>
 

<p></p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>aPath</dt>
<dd>Path to the WebUI library.</dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return">Returns true if it exists.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="StringToPWebUIChar-string-integer-"></span><code>function <strong>StringToPWebUIChar</strong>(const aSrcString: string; var aRsltLength: integer): <a href="uWebUITypes.html#PWebUIChar">PWebUIChar</a>;</code></td>
</tr>
<tr><td colspan="1">
<p>
 Converts a unicode string to a WebUI string. This function should only be used by the file handler callback. By allocating resources using webui_malloc() WebUI will automaticaly free the resources. </p>
<p>
 

<p></p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>aSrcString</dt>
<dd>The original unicode string.</dd>
<dt>aRsltLength</dt>
<dd>The length of the result string.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="PathIsRelativeAnsi-LPCSTR-"></span><code>function <strong>PathIsRelativeAnsi</strong>(pszPath: LPCSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsRelativeA';</code></td>
</tr>
<tr><td colspan="1">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="PathIsRelativeUnicode-LPCWSTR-"></span><code>function <strong>PathIsRelativeUnicode</strong>(pszPath: LPCWSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsRelativeW';</code></td>
</tr>
<tr><td colspan="1">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="PathCanonicalizeAnsi-LPSTR-LPCSTR-"></span><code>function <strong>PathCanonicalizeAnsi</strong>(pszBuf: LPSTR; pszPath: LPCSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathCanonicalizeA';</code></td>
</tr>
<tr><td colspan="1">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="PathCanonicalizeUnicode-LPWSTR-LPCWSTR-"></span><code>function <strong>PathCanonicalizeUnicode</strong>(pszBuf: LPWSTR; pszPath: LPCWSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathCanonicalizeW';</code></td>
</tr>
<tr><td colspan="1">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="PathIsUNCAnsi-LPCSTR-"></span><code>function <strong>PathIsUNCAnsi</strong>(pszPath: LPCSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsUNCA';</code></td>
</tr>
<tr><td colspan="1">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="PathIsUNCUnicode-LPCWSTR-"></span><code>function <strong>PathIsUNCUnicode</strong>(pszPath: LPCWSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsUNCW';</code></td>
</tr>
<tr><td colspan="1">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="PathIsURLAnsi-LPCSTR-"></span><code>function <strong>PathIsURLAnsi</strong>(pszPath: LPCSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsURLA';</code></td>
</tr>
<tr><td colspan="1">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="PathIsURLUnicode-LPCWSTR-"></span><code>function <strong>PathIsURLUnicode</strong>(pszPath: LPCWSTR): BOOL; stdcall; external <a href="uWebUIMiscFunctions.html#SHLWAPIDLL">SHLWAPIDLL</a> name 'PathIsURLW';</code></td>
</tr>
<tr><td colspan="1">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<h3 class="detail">Constants</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SHLWAPIDLL"></span><code><strong>SHLWAPIDLL</strong>  = 'shlwapi.dll';</code></td>
</tr>
<tr><td colspan="1">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
